<template>
  <el-image
      class="image"
      :src="getUrl(file)"
      :preview-src-list="[getUrl(file)]"
      :initial-index="0"
      fit="cover"
  />
</template>

<script>
import {ElImage} from "element-plus";

export default {
  name: "ImageMessageEle",
  props: {
    file: {
      type: String
    }
  },
  components: {
    ElImage
  },
  methods: {
    getUrl(file) {
      return `https://job-linker.obs.cn-north-4.myhuaweicloud.com/${file}`
    }
  }
}
</script>

<style scoped>
.image {
  height: 180px;
}
</style>